.class final Lcom/wqmobile/sdk/protocol/v;
.super Ljava/util/TimerTask;


# instance fields
.field private synthetic a:Lcom/wqmobile/sdk/protocol/r;


# direct methods
.method constructor <init>(Lcom/wqmobile/sdk/protocol/r;)V
    .locals 0

    iput-object p1, p0, Lcom/wqmobile/sdk/protocol/v;->a:Lcom/wqmobile/sdk/protocol/r;

    invoke-direct {p0}, Ljava/util/TimerTask;-><init>()V

    return-void
.end method


# virtual methods
.method public final run()V
    .locals 5

    const/4 v4, 0x2

    :try_start_0
    iget-object v0, p0, Lcom/wqmobile/sdk/protocol/v;->a:Lcom/wqmobile/sdk/protocol/r;

    invoke-static {v0}, Lcom/wqmobile/sdk/protocol/r;->a(Lcom/wqmobile/sdk/protocol/r;)Lcom/wqmobile/sdk/protocol/a;

    move-result-object v0

    invoke-virtual {v0}, Lcom/wqmobile/sdk/protocol/a;->a()Z

    move-result v0

    if-nez v0, :cond_3

    iget-object v0, p0, Lcom/wqmobile/sdk/protocol/v;->a:Lcom/wqmobile/sdk/protocol/r;

    invoke-static {v0}, Lcom/wqmobile/sdk/protocol/r;->d(Lcom/wqmobile/sdk/protocol/r;)Z

    move-result v0

    if-nez v0, :cond_2

    iget-object v0, p0, Lcom/wqmobile/sdk/protocol/v;->a:Lcom/wqmobile/sdk/protocol/r;

    invoke-static {v0}, Lcom/wqmobile/sdk/protocol/r;->a(Lcom/wqmobile/sdk/protocol/r;)Lcom/wqmobile/sdk/protocol/a;

    move-result-object v0

    iget v0, v0, Lcom/wqmobile/sdk/protocol/a;->e:I
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1

    if-ne v0, v4, :cond_2

    :try_start_1
    iget-object v0, p0, Lcom/wqmobile/sdk/protocol/v;->a:Lcom/wqmobile/sdk/protocol/r;

    const-string v1, "udp"

    const-string v2, "adwaken.com"

    invoke-static {v2}, Ljava/net/InetAddress;->getByName(Ljava/lang/String;)Ljava/net/InetAddress;

    move-result-object v2

    const v3, 0xf44b

    invoke-static {v1, v2, v3}, Lcom/wqmobile/sdk/protocol/n;->a(Ljava/lang/String;Ljava/net/InetAddress;I)Lcom/wqmobile/sdk/protocol/b/a;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/wqmobile/sdk/protocol/r;->a(Lcom/wqmobile/sdk/protocol/r;Lcom/wqmobile/sdk/protocol/b/a;)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    :goto_0
    :try_start_2
    iget-object v0, p0, Lcom/wqmobile/sdk/protocol/v;->a:Lcom/wqmobile/sdk/protocol/r;

    const/4 v1, 0x1

    invoke-static {v0, v1}, Lcom/wqmobile/sdk/protocol/r;->a(Lcom/wqmobile/sdk/protocol/r;Z)V

    iget-object v0, p0, Lcom/wqmobile/sdk/protocol/v;->a:Lcom/wqmobile/sdk/protocol/r;

    invoke-static {v0}, Lcom/wqmobile/sdk/protocol/r;->a(Lcom/wqmobile/sdk/protocol/r;)Lcom/wqmobile/sdk/protocol/a;

    move-result-object v0

    const/4 v1, 0x0

    iput v1, v0, Lcom/wqmobile/sdk/protocol/a;->e:I

    :cond_0
    iget-object v0, p0, Lcom/wqmobile/sdk/protocol/v;->a:Lcom/wqmobile/sdk/protocol/r;

    invoke-static {v0}, Lcom/wqmobile/sdk/protocol/r;->a(Lcom/wqmobile/sdk/protocol/r;)Lcom/wqmobile/sdk/protocol/a;

    move-result-object v0

    iget v0, v0, Lcom/wqmobile/sdk/protocol/a;->e:I

    if-ge v0, v4, :cond_1

    iget-object v0, p0, Lcom/wqmobile/sdk/protocol/v;->a:Lcom/wqmobile/sdk/protocol/r;

    invoke-static {v0}, Lcom/wqmobile/sdk/protocol/r;->b(Lcom/wqmobile/sdk/protocol/r;)Landroid/os/Handler;

    move-result-object v0

    invoke-virtual {v0}, Landroid/os/Handler;->obtainMessage()Landroid/os/Message;

    move-result-object v0

    iget-object v1, p0, Lcom/wqmobile/sdk/protocol/v;->a:Lcom/wqmobile/sdk/protocol/r;

    invoke-static {v1}, Lcom/wqmobile/sdk/protocol/r;->f(Lcom/wqmobile/sdk/protocol/r;)Landroid/os/Message;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/os/Message;->copyFrom(Landroid/os/Message;)V

    iget-object v1, p0, Lcom/wqmobile/sdk/protocol/v;->a:Lcom/wqmobile/sdk/protocol/r;

    invoke-static {v1}, Lcom/wqmobile/sdk/protocol/r;->b(Lcom/wqmobile/sdk/protocol/r;)Landroid/os/Handler;

    move-result-object v1

    invoke-virtual {v1, v0}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    iget-object v0, p0, Lcom/wqmobile/sdk/protocol/v;->a:Lcom/wqmobile/sdk/protocol/r;

    invoke-static {v0}, Lcom/wqmobile/sdk/protocol/r;->a(Lcom/wqmobile/sdk/protocol/r;)Lcom/wqmobile/sdk/protocol/a;

    move-result-object v0

    iget v1, v0, Lcom/wqmobile/sdk/protocol/a;->e:I

    add-int/lit8 v1, v1, 0x1

    iput v1, v0, Lcom/wqmobile/sdk/protocol/a;->e:I

    :cond_1
    :goto_1
    return-void

    :catch_0
    move-exception v0

    iget-object v0, p0, Lcom/wqmobile/sdk/protocol/v;->a:Lcom/wqmobile/sdk/protocol/r;

    const/4 v1, 0x0

    invoke-static {v0, v1}, Lcom/wqmobile/sdk/protocol/r;->a(Lcom/wqmobile/sdk/protocol/r;Lcom/wqmobile/sdk/protocol/b/a;)V
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_1

    goto :goto_0

    :catch_1
    move-exception v0

    invoke-static {v0}, Lcom/wqmobile/sdk/protocol/cmd/b;->a(Ljava/lang/Exception;)V

    goto :goto_1

    :cond_2
    :try_start_3
    iget-object v0, p0, Lcom/wqmobile/sdk/protocol/v;->a:Lcom/wqmobile/sdk/protocol/r;

    invoke-static {v0}, Lcom/wqmobile/sdk/protocol/r;->d(Lcom/wqmobile/sdk/protocol/r;)Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/wqmobile/sdk/protocol/v;->a:Lcom/wqmobile/sdk/protocol/r;

    invoke-static {v0}, Lcom/wqmobile/sdk/protocol/r;->a(Lcom/wqmobile/sdk/protocol/r;)Lcom/wqmobile/sdk/protocol/a;

    move-result-object v0

    iget v0, v0, Lcom/wqmobile/sdk/protocol/a;->e:I

    if-ne v0, v4, :cond_0

    iget-object v0, p0, Lcom/wqmobile/sdk/protocol/v;->a:Lcom/wqmobile/sdk/protocol/r;

    invoke-static {v0}, Lcom/wqmobile/sdk/protocol/r;->a(Lcom/wqmobile/sdk/protocol/r;)Lcom/wqmobile/sdk/protocol/a;

    move-result-object v0

    iget-boolean v0, v0, Lcom/wqmobile/sdk/protocol/a;->f:Z
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_1

    if-nez v0, :cond_0

    :try_start_4
    iget-object v0, p0, Lcom/wqmobile/sdk/protocol/v;->a:Lcom/wqmobile/sdk/protocol/r;

    invoke-static {v0}, Lcom/wqmobile/sdk/protocol/r;->e(Lcom/wqmobile/sdk/protocol/r;)V
    :try_end_4
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_2

    :goto_2
    :try_start_5
    iget-object v0, p0, Lcom/wqmobile/sdk/protocol/v;->a:Lcom/wqmobile/sdk/protocol/r;

    invoke-static {v0}, Lcom/wqmobile/sdk/protocol/r;->a(Lcom/wqmobile/sdk/protocol/r;)Lcom/wqmobile/sdk/protocol/a;

    move-result-object v0

    const/4 v1, 0x1

    iput-boolean v1, v0, Lcom/wqmobile/sdk/protocol/a;->f:Z

    iget-object v0, p0, Lcom/wqmobile/sdk/protocol/v;->a:Lcom/wqmobile/sdk/protocol/r;

    const/4 v1, 0x0

    invoke-static {v0, v1}, Lcom/wqmobile/sdk/protocol/r;->a(Lcom/wqmobile/sdk/protocol/r;Z)V

    iget-object v0, p0, Lcom/wqmobile/sdk/protocol/v;->a:Lcom/wqmobile/sdk/protocol/r;

    invoke-static {v0}, Lcom/wqmobile/sdk/protocol/r;->a(Lcom/wqmobile/sdk/protocol/r;)Lcom/wqmobile/sdk/protocol/a;

    move-result-object v0

    invoke-virtual {v0}, Lcom/wqmobile/sdk/protocol/a;->j()V

    goto :goto_1

    :catch_2
    move-exception v0

    iget-object v0, p0, Lcom/wqmobile/sdk/protocol/v;->a:Lcom/wqmobile/sdk/protocol/r;

    const/4 v1, 0x0

    invoke-static {v0, v1}, Lcom/wqmobile/sdk/protocol/r;->a(Lcom/wqmobile/sdk/protocol/r;Lcom/wqmobile/sdk/protocol/b/a;)V

    goto :goto_2

    :cond_3
    iget-object v0, p0, Lcom/wqmobile/sdk/protocol/v;->a:Lcom/wqmobile/sdk/protocol/r;

    invoke-virtual {v0}, Lcom/wqmobile/sdk/protocol/r;->a()V
    :try_end_5
    .catch Ljava/lang/Exception; {:try_start_5 .. :try_end_5} :catch_1

    goto :goto_1
.end method
